package com.ruoyi.pingjiao.service.impl;

import java.util.List;

import com.ruoyi.pingjiao.domain.CourseRequirement;
import com.ruoyi.pingjiao.mapper.CourseRequirementMapper;
import com.ruoyi.pingjiao.service.ICourseRequirementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 课程毕业要求Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-08
 */
@Service
public class CourseRequirementServiceImpl implements ICourseRequirementService
{
    @Autowired
    private CourseRequirementMapper courseRequirementMapper;

    /**
     * 查询课程毕业要求
     * 
     * @param requirementId 课程毕业要求主键
     * @return 课程毕业要求
     */
    @Override
    public List<CourseRequirement> selectCourseRequirementByRequirementId(Long requirementId)
    {
        return courseRequirementMapper.selectCourseRequirementByRequirementId(requirementId);
    }

    /**
     * 查询课程毕业要求列表
     * 
     * @param courseRequirement 课程毕业要求
     * @return 课程毕业要求
     */
    @Override
    public List<CourseRequirement> selectCourseRequirementList(CourseRequirement courseRequirement)
    {
        return courseRequirementMapper.selectCourseRequirementList(courseRequirement);
    }

    /**
     * 新增课程毕业要求
     * 
     * @param courseRequirement 课程毕业要求
     * @return 结果
     */
    @Override
    public int insertCourseRequirement(CourseRequirement courseRequirement)
    {
        return courseRequirementMapper.insertCourseRequirement(courseRequirement);
    }

    /**
     * 修改课程毕业要求
     * 
     * @param courseRequirement 课程毕业要求
     * @return 结果
     */
    @Override
    public int updateCourseRequirement(CourseRequirement courseRequirement)
    {
        return courseRequirementMapper.updateCourseRequirement(courseRequirement);
    }

    /**
     * 批量删除课程毕业要求
     * 
     * @param requirementIds 需要删除的课程毕业要求主键
     * @return 结果
     */
    @Override
    public int deleteCourseRequirementByRequirementIds(Long[] requirementIds)
    {
        return courseRequirementMapper.deleteCourseRequirementByRequirementIds(requirementIds);
    }

    /**
     * 删除课程毕业要求信息
     * 
     * @param requirementId 课程毕业要求主键
     * @return 结果
     */
    @Override
    public int deleteCourseRequirementByRequirementId(Long requirementId)
    {
        return courseRequirementMapper.deleteCourseRequirementByRequirementId(requirementId);
    }
}
